/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

(function($){

window.form_designer = {

	pallete : null,
	pallete_items : {},

	init : function() {

		this.pallete = $('#designer-pallete');

	},

	add_pallete_item : function(name, obj) {

		$.extend(this.pallete_items, {
			'name' : name,
			'obj' : obj
		});

		var icon = obj.get_icon();

		var ul = this.pallete.find('ul');
		var img = $('<img />');
		var li = $('<li></li>');

		img.attr('src', icon);

		ul.append(li);
	}

};

var text_pallete = {

	designer : null,

	init : function(instance) {
		this.designer = instance;
	},

	get_icon : function() {
		return '';
	}

};

form_designer.init();
form_designer.add_pallete_item('text', text_pallete);

})(jQuery);
